home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 12 / 012.d81 / net worth (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  5KB  |  185 lines

  1. 100 poke53280,1:poke53281,1:poke646,6
  2. 110 printchr$(147):forx=1to9:print:next
  3. 120 printtab(10);"net worth statement"
  4. 130 printtab(10)"-------------------"
  5. 140 fort=1to1000:next
  6. 150 ::
  7. 160 printchr$(147):print
  8. 170 input"name";n$:print
  9. 180 input"street address";e$:print
  10. 190 print"city & state (do not use comma after"
  11. 200 input"city)";u$
  12. 210 dimd$(38)
  13. 220 printchr$(147):print:printtab(13);"*** assets ***"
  14. 230 printtab(13);"--------------"
  15. 240 print
  16. 250 print"enter amount of:":print
  17. 260 forx=1to3
  18. 270 gosub1690:inputa(x):next
  19. 280 a=a(1)+a(2)+a(3)
  20. 290 print:print"enter value of:":print
  21. 300 forx=4to10
  22. 310 gosub1690:inputa(x):next
  23. 320 a1=a+a(4)+a(5)+a(6)+a(7)+a(8)+a(9)+a(10)
  24. 330 forx=1to10
  25. 340 gosub1690:inputb(x):next
  26. 350 a2=b(1)+b(2)+b(3)+b(4)+b(5)+b(6)+b(7)+b(8)+b(9)+b(10)
  27. 360 printchr$(147):print
  28. 370 print"list other cash value assets.":print
  29. 380 print"enter item name <comma> amount.":print
  30. 390 print"use comma[146] 0[146] to exit.":print
  31. 400 z=0:forx=1to10
  32. 410 print"item #";x;
  33. 420 inputc$(x),c(x)
  34. 430 ifc(x)=0thengoto450
  35. 440 z=z+1:next
  36. 450 c1=c(1)+c(2)+c(3)+c(4)+c(5)+c(6)+c(7)+c(8)+c(9)+c(10)
  37. 460 ta=a1+a2+c1
  38. 470 ::
  39. 480 printchr$(147):print
  40. 490 printtab(10)"*** liabilities ***"
  41. 500 printtab(10)"-------------------":print
  42. 510 print"list loans/debts due in less than a year"
  43. 520 print"enter item name <comma> amount.":print
  44. 530 print"use comma[146] 0[146] to exit.":print
  45. 540 v=0:forx=1to10
  46. 550 print"item #";x;
  47. 560 inputl$(x),l(x)
  48. 570 ifl(x)=0thengoto590
  49. 580 v=v+1:next
  50. 590 l1=l(1)+l(2)+l(3)+l(4)+l(5)+l(6)+l(7)+l(8)+l(9)+l(10)
  51. 600 printchr$(147):print
  52. 610 print"enter remaining balance for :":print
  53. 620 forx=1to10
  54. 630 gosub1690:inputg(x):next
  55. 640 g1=g(1)+g(2)+g(3)+g(4)+g(5)+g(6)+g(7)+g(8)+g(9)+g(10)
  56. 650 forx=1to3
  57. 660 gosub1690:inputf(x):next
  58. 670 f1=f(1)+f(2)+f(3)
  59. 680 print
  60. 690 print"enter unpaid taxes for :":print
  61. 700 forx=1to4
  62. 710 gosub1690:inputt(x):next
  63. 720 t1=t(1)+t(2)+t(3)+t(4)
  64. 730 printchr$(147):print
  65. 740 print"list balances for other long term loans."
  66. 750 print"enter item name <comma> amount.":print
  67. 760 w=0:forx=1to10
  68. 770 print"item #";x;
  69. 780 inputh$(x),h(x)
  70. 790 ifh(x)=0thengoto810
  71. 800 w=w+1:next
  72. 810 h1=h(1)+h(2)+h(3)+h(4)+h(5)+h(6)+h(7)+h(8)+h(9)+h(10)
  73. 820 tl=l1+g1+f1+t1+h1
  74. 830 open4,4
  75. 840 print#4,spc(int(80-len(n$))/2);n$
  76. 850 print#4,spc(int(80-len(e$))/2);e$
  77. 860 print#4,spc(int(80-len(u$))/2);u$
  78. 870 print#4:print#4:print#4
  79. 880 restore
  80. 890 print#4,spc(32);"*** assets ***"
  81. 900 print#4,spc(32);"--------------"
  82. 910 print#4
  83. 920 forx=1to10
  84. 930 readd$
  85. 940 i$=str$(int(a(x)))+"."+right$(str$(a(x)*100),2)
  86. 950 ifval(i$)=0then970
  87. 960 print#4,spc(5);d$;spc(65-len(d$)-len(i$));i$
  88. 970 next
  89. 980 forx=1to10
  90. 990 readd$
  91. 1000 i$=str$(int(b(x)))+"."+right$(str$(b(x)*100),2)
  92. 1010 ifval(i$)=0then1030
  93. 1020 print#4,spc(5);d$;spc(65-len(d$)-len(i$));i$
  94. 1030 next
  95. 1040 ifz=0then1100
  96. 1050 forj=1toz
  97. 1060 i$=str$(int(c(j)))+"."+right$(str$(c(j)*100),2)
  98. 1070 print#4,spc(5);c$(j);spc(65-len(c$(j))-len(i$));i$
  99. 1080 next
  100. 1090 print#4
  101. 1100 print#4:q$="----------"
  102. 1110 print#4,spc(70-len(q$));q$
  103. 1120 print#4,spc(70-len(q$));q$
  104. 1130 ta$="total assets"
  105. 1140 i$=str$(int(ta))+"."+right$(str$(ta*100),2)
  106. 1150 print#4,spc(5);ta$;spc(65-len(ta$)-len(i$));i$
  107. 1160 print#4:print#4
  108. 1170 print#4,spc(30);"*** liabilities ***"
  109. 1180 print#4,spc(30);"-------------------"
  110. 1190 print#4
  111. 1200 ifv=0then1250
  112. 1210 forj=1tov
  113. 1220 i$=str$(int(l(j)))+"."+right$(str$(l(j)*100),2)
  114. 1230 print#4,spc(5);l$(j);spc(65-len(l$(j))-len(i$));i$
  115. 1240 next
  116. 1250 forx=1to10:readd$
  117. 1260 i$=str$(int(g(x)))+"."+right$(str$(g(x)*100),2)
  118. 1270 ifval(i$)=0then1290
  119. 1280 print#4,spc(5);d$;spc(65-len(d$)-len(i$));i$
  120. 1290 next
  121. 1300 forx=1to3:readd$
  122. 1310 i$=str$(int(f(x)))+"."+right$(str$(f(x)*100),2)
  123. 1320 ifval(i$)=0then1340
  124. 1330 print#4,spc(5);d$;spc(65-len(d$)-len(i$));i$
  125. 1340 next
  126. 1350 forx=1to4:readd$
  127. 1360 i$=str$(int(t(x)))+"."+right$(str$(t(x)*100),2)
  128. 1370 ifval(i$)=0then1400
  129. 1380 print#4,spc(5);d$;spc(65-len(d$)-len(i$));i$
  130. 1390 next
  131. 1400 ifw=0then1440
  132. 1410 forj=1tow
  133. 1420 i$=str$(int(h(j)))+"."+right$(str$(h(j)*100),2)
  134. 1430 print#4,spc(5);h$(j);spc(65-len(h$(j))-len(i$));i$
  135. 1440 next
  136. 1450 print#4:print#4
  137. 1460 q$="----------"
  138. 1470 print#4,spc(70-len(q$));q$
  139. 1480 print#4,spc(70-len(q$));q$
  140. 1490 tl$="total liabilities"
  141. 1500 i$=str$(int(tl))+"."+right$(str$(tl*100),2)
  142. 1510 print#4,spc(5);tl$;spc(65-len(tl$)-len(i$));i$
  143. 1520 print#4
  144. 1530 nw$="net worth":nw=ta-tl
  145. 1540 i$=str$(int(nw))+"."+right$(str$(nw*100),2)
  146. 1550 print#4,spc(5);nw$;spc(65-len(nw$)-len(i$));i$
  147. 1560 q$="----------"
  148. 1570 print#4,spc(70-len(q$));q$
  149. 1580 print#4,spc(70-len(q$));q$
  150. 1590 print#4:print#4
  151. 1595 iftl=0thenprint#4,spc(5)"solvency ratio is undefined.":goto1620
  152. 1600 sr=ta/tl:sr=(int(sr*1000+.5))/1000
  153. 1610 print#4,spc(5)"solvency ratio is ";sr
  154. 1620 print#4:close4
  155. 1630 printchr$(147):print
  156. 1635 input"another copy";zz$
  157. 1640 ifleft$(zz$,1)="y"then830
  158. 1645 input"another statement";zz$
  159. 1650 ifleft$(zz$,1)="n"then1670
  160. 1660 clr:goto160
  161. 1670 printchr$(147):print:print:print:print"thank you.":goto63000
  162. 1680 ::
  163. 1690 readd$(x):printd$(x);
  164. 1700 return
  165. 1710 ::
  166. 1720 rem ** data for assets **
  167. 1730 datacash on hand,cash in checking acct.,cash in savings acct.
  168. 1740 datasavings bonds,real estate,cash value of insurance
  169. 1750 datastocks,bonds,automobile (s)
  170. 1760 datapensions,annuities,patents & royalties
  171. 1765 dataequity in business ventures
  172. 1770 datacollections,jewelry furs,furniture,machinery & tools
  173. 1780 dataclothing & personal effects,hobby equipment,profit sharing
  174. 1790 ::
  175. 1800 rem ** data for liabilities **
  176. 1810 datahome mortgage,other real estate,automobile loan (s),furniture
  177. 1820 dataappliance loan (s),personal loan (s),education loan (s)
  178. 1830 datadebts to indivduals
  179. 1840 datamedical bills,dental bills,rent,utilities,alimony,federal,state
  180. 1850 datalocal,investments
  181. 63000 rem    connect back to l.s.
  182. 63001 fordl=1to500:nextdl
  183. 63002 print"[147]load"chr$(34)"payload"chr$(34)",8":print"run"
  184. 63004 poke198,0:poke631,13:poke632,13:poke198,2:end
  185.